package fr.compil.tab.ihm;

import java.awt.Dimension;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.Border;

public class FormuleBox extends JPanel{
	

	private JTextField text;
	private Border border;
	private Tableur tableur;
	
	public FormuleBox(){
		
		//label
		JLabel label = new JLabel("Formule : ");
		
		//formule
		text = new JTextField();
		this.add(text);
		text.setPreferredSize(new Dimension(500,25));
		
		//Border
		border = BorderFactory.createLoweredBevelBorder();
		text.setBorder(border);
		
		//add
		this.add(label);
		this.add(text);
	}
	
	public String getFormule(){
		return text.getText();
	}
	
	public void setText(String formule){
		text.setText(formule);
	}
	
	public JTextField getFormuleBox(){
		return text;
	}



}